using System;
using System.Collections.Generic;
using System.Text;
using AjGenesisStudio.Properties;

namespace AjGenesisStudio.Commands
{
    class DecreaseFontCommand : Command
    {
        public override bool Execute()
        {
            Global.Instance.StartWork("Decreasing font size");

            List<Documents.Document> docs =
                Global.Instance.MainForm.GetDocuments();

            float size = Settings.Default.FontSize;

            if (size > 1)
                size--;

            foreach (Documents.Document doc in docs)
                doc.editor.FontSize = size;

            Settings.Default.FontSize = size;

            Global.Instance.EndWork();

            return true;
        }
    }
}
